package 模板方法;

/**
 * @program: leetcode
 * @description:
 * @author: HuRan QQ1345122890
 * @create: 2021-11-07 13:00
 */
public abstract class AbstractDisplay {
    abstract void open();

    abstract void print();

    abstract void close();

    public final void display() {
        open();
        for (int i = 0; i < 5; i++) {
            print();
        }
        close();
    }
}